package com.wxx.design.lazysingleton;

/**
 * @author Jetwang
 * @version 1.0
 * @date 2022/4/11 19:50
 * StaticInnerClassSingleton 静态内部类的单例模式
 */
public class StaticInnerClassSingleton {
    private static class InnerClass {
        private static StaticInnerClassSingleton staticInnerClassSingleton
                = new StaticInnerClassSingleton();
    }
    public static StaticInnerClassSingleton getInstance() {
        return InnerClass.staticInnerClassSingleton;
    }

    private StaticInnerClassSingleton() {
    }
}
